<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<div class="mainBody" style="overflow: auto; width: 680px">

	<div class="editBody">
		<input type="hidden" name='os' value='<?php echo $cur_os;?>' />
		<div class="bodyTitle" style="">
			<div class="titleIcon editTitle"></div>
			<p class="titleName fontDinproMedium" style="">EDIT APPLICATION</p>
		</div>
		<div class="bodyDiv fontDinpro">
			<div class="divContent">
				<p class="fontDinproMedium">AppID:</p>
				<div class="rightContent">
					<label class="autoWidth"><?php echo $task_info['appid'];?></label>
				</div>
			</div>
		</div>
		<div class="bodyDiv fontDinpro">
			<div class="divContent">
				<p class="fontDinproMedium">Name:</p>
				<div class="rightContent">
					<label class="autoWidth"><?php echo $app_names[$task_info['appid']];?></label>
				</div>
			</div>
		</div>

		<div id="messagecontent" class="bodyDiv fontDinpro">
			<div class="divContent">
				<p class="fontDinproMedium">OS:</p>
				<div class="rightContent">
                        <?php
                        $className = '';
                        switch($os[$task_info['os']]){
                            case "ios":
                                $className = "";
                                break;
                            case "android":
                                $className = "bgAndroidGreen";
                                break;
                            case "wp":
                                $className = "bgBlue";
                                break;
                        }
                        ?>
                        <span class="colorLabel <?php echo $className; ?>"><?php echo $os[$task_info['os']];?></span>
				</div>
			</div>
		</div>

		<div id="messagecontent" class="bodyDiv fontDinpro">
			<div class="divContent">
				<p class="fontDinproMedium">Version:</p>
				<div class="rightContent">
					<label class="autoWidth"><?php echo $task_info['version'];?></label>
				</div>
			</div>
		</div>

		<div id="messagecontent" class="bodyDiv fontDinpro">
			<div class="divContent">
				<p class="fontDinproMedium">Uri:</p>
				<div class="rightContent">
					<label class="autoWidth"><?php echo $task_info['uri'];?></label>
				</div>
			</div>
		</div>
		<div class="bodyDiv fontDinpro">
			<div class="divContent">
				<p class="fontDinproMedium">Params:</p>
				<div class="rightContent">
					<textarea style="height: auto;" readonly="readonly"><?php echo str_replace_escape('"',$task_info ['chcode_params']); ?></textarea>
				</div>
			</div>
		</div>
		<div id="messagecontent" class="bodyDiv fontDinpro">
			<div class="divContent">
				<p class="fontDinproMedium">Status:</p>
				<div class="rightContent">
        <?php

								switch ($task_info ['status']) {
									case 0 :
										echo '<span class="colorLabel bgBlue" style="display: inline-flex;">等待开始</span>';
										break;
									case 1 :
										echo '<span class="colorLabel bgOrange" style="display: inline-flex;">进行中</span>';
										break;
									case 2 :
										echo '<span class="colorLabel bgGreen" style="display: inline-flex;">已完成</span>';
										break;
									case 3 :
										echo '<span class="colorLabel bgBlack" style="display: inline-flex;">暂停</span>';
										break;
									default :
										echo '<span class="colorLabel bgRed" style="display: inline-flex;">出错了</span>';
										break;
								}
								?>
                    </div>
			</div>
		</div>
		<button class="btn submitBtn fontDinproBold"
			onclick="location='<?php echo backend_url('pack/view/os/'.$task_info['os']); ?>'"
			type='submit'>BACK</button>

	</div>
</div>
